package com.fox.stock.mapper;

import com.fox.stock.pojo.domain.*;
import com.fox.stock.pojo.entity.StockRtInfo;
import org.apache.ibatis.annotations.Param;
import org.joda.time.DateTime;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Map;

/**
* @author 20555
* @description 针对表【stock_rt_info(个股详情信息表)】的数据库操作Mapper
* @createDate 2025-05-18 16:51:05
* @Entity com.fox.stock.pojo.entity.StockRtInfo
*/
public interface StockRtInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockRtInfo record);

    int insertSelective(StockRtInfo record);

    StockRtInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockRtInfo record);

    int updateByPrimaryKey(StockRtInfo record);

    int insertBatch(@Param("list") List<StockRtInfo> list);

    List<Map> getCodeAndNameBySearchStr(@Param("searchStr") String searchStr);

    StockRtInfoDomain getRtInfoMainWork(@Param("code") String code);

    Map<String,Object> getWeekKLineInfo(@Param("dates") List<Date> dates, @Param("code") String code);

    BigDecimal getOpenPriceByWeek1(@Param("week1") Date openDateByWeek1, @Param("code") String code);

    BigDecimal getCurTimeByWeek5(@Param("week5") Date curTimeByWeek5, @Param("code") String code);

    StockRtDomain getStockRtDetailInfo(@Param("code") String code, @Param("date") Date date);

    List<Map<String, Object>> getTradeDetailPre10Info(@Param("code") String code);

    List<StockUpdownDomain> getStockUpDownByPageHlper(@Param("date") Date date);

    List<StockUpdownDomain> getStockUpDownList(@Param("date") Date date);

    List<Map> getStockUpDownCount(@Param("openDate") Date openDate, @Param("endDate") Date endDate, @Param("flag") int flag);

    List<Map> getPriceRangeInfo(@Param("time") Date time);

    List<Stock4MinuteDomain> getStockScreenTimeSharing(@Param("code") String code, @Param("startDate") Date startDate, @Param("endDate") Date endDate);

    List<Stock4EvrDayDomain> getStockScreenDayTimeSharing(@Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("code") String code);

//    List<Date> getLastTimeByDayInfo(@Param("set") HashSet<Date> set, @Param("code") String code);

    List<Stock4EvrDayDomain> getStockKDayByTime(@Param("code") String code, @Param("listDate") HashSet<Date> listDate);

}
